<?php
// $Id$

/**
 * Checks to see if the token being passed is valid.
 *
 * @param $token
 *   A variable containing a possible token.
 * @return
 *   TRUE if the token is either NULL or a correctly formatted array.
 */
function _friendfeed_oauth_check_token($token) {
  return ($token == NULL) || (is_array($token) && (isset($token['key']) && isset($token['secret'])));
}